package com.springboot.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

@Data
public class DemandSubApplyDTO {

    @NotEmpty(message = "标题不能为空！")
    @NotNull(message = "标题不能为空！")
    @Size(min = 4, max = 20, message = "标题长度必须在4到20之间！")
    private String name;

    @NotEmpty(message = "需求类型不能为空！")
    @NotNull(message = "需求类型不能为空！")
    private String type;
    private String projectSize;
    private String description;

    @NotEmpty(message = "交付物不能为空！")
    @NotNull(message = "交付物不能为空！")
    private String delivery;

    @NotEmpty(message = "金额不能为空！")
    @NotNull(message = "金额不能为空！")
    private String money;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date deadline;

    private String language;
    private String tecQualification;
    private String busQualification;
    private String specReq;
    private String belongSystem;
    private String belongProject;
    private String paymentWay;
    private String priority;
    private String difficulty;

    @NotNull(message = "平台可见性不能为空！")
    private Integer platShown;              //平台是否可见

    @NotNull(message = "外包商可见性不能为空！")
    private Integer outsourcerShown;        //外包商是否可见
    private List<String> outsourcerIds;
    private List<String> files;
}
